package com.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.domain.po.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface CartMapper extends BaseMapper<Cart> {
    @Update("update cart set num = num + 1 where item_id = #{itemId} and user_id = #{userId}")
    void updateItemCount(Long itemId, Long userId);
}
